home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
word.arj
/
PARALLAX.DOC
< prev
next >
Wrap
Text File
|
1993-01-30
|
1KB
|
35 lines
Parallax Scrolling
~~~~~~~~~~~~~~~~~~
To use parallax scrolling, make an external reference to the variable
wgtparallax.
eg:
extern int wgtparallax;
When this variable is set to 0, normal scrolling is performed.
When it is 1, the tiles are scrolled over the screen, using an XRAY mode
like wputblock.
You must put the background on the screen yourself. To do this, you need
to set up the screen properly.
eg:
wsetscreen(scroll1); // writes to scroll1 screen
wclip(0,0,windowmaxx,windowmaxy); /* clips to scroll window (note this is
different from where you copy it
onto the visual screen later.
Top left corner ALWAYS starts at 0,0*/
wputblock(0,0,background,0); // puts the background on
wscrollwindow(spx,spy,gamemap); // update the scrolling window
This is the simplest possible case. You may want to shift, skew, resize,
show an FLI (by setting FLISCREEN) or do other things with the background
while scrolling.
Remeber that parallax scrolling slows down the computer a lot, so make
sure you can turn it off for users with slower computers.
I only get 6 frames per second max with it turned on, but on a fast
486, I'm sure it would look great!!!
Chris Egerter